package dashboard

import "gitcode.com/G-YT/iHealth25/server/model/user"

type User struct {
	Register         int64                  `json:"register"`
	VIP              int64                  `json:"vip"`
	Expire           int64                  `json:"expire"`
	AgePie           []Pie                  `json:"age_pie"`
	SexPie           []Pie                  `json:"sex_pie"`
	RegistrantsRank  []RankInfo             `json:"registrants_rank"`
	AddLine          map[string][]user.User `json:"add_line"`
	PlanHistogram    map[string]int64       `json:"plan_histogram"`
	PlanRank         []RankInfo             `json:"plan_rank"`
	DiseaseRank      []DiseaseRankInfo      `json:"disease_rank"`
	HierarchyPie     []Pie                  `json:"hierarchy_pie"`
	ServiceHistogram map[string]int64       `json:"service_histogram"`
	Invite           int                    `json:"invite"`
	Served           int                    `json:"served"`
	Score            int                    `json:"score"`
	PlanPercent      map[string]uint        `json:"fanganpercent"`
}

type Pie struct {
	Name  string `json:"name"`
	Value int64  `json:"value"`
}

type Steward struct {
	Application     int64      `json:"total"`
	Incumbency      int64      `json:"incumbency"`
	LevelProportion []Pie      `json:"level_proportion"`
	RegistrantsRank []RankInfo `json:"registrants_rank"`
	ServedRank      []RankInfo `json:"served_rank"`
	ExcellentRank   []RankInfo `json:"excellent_rank"`
}

type RankInfo struct {
	Username string `json:"username" gorm:"username"`
	Count    int    `json:"count" gorm:"count"`
	IDs      string `json:"IDs" gorm:"IDs"`
}

type DiseaseRankInfo struct {
	Username string `json:"username"`
	Count    int    `json:"count"`
	UserIDs  []uint `json:"user_ids"`
}
